Copyright: SourcePrinter Copyright ® 1994 F. Douglas Ansuini


Contents
SourcePrinter      Version 1.0

Copyright © 1994  F. Douglas Ansuini

Contents

Overview	Registering	Order Form

Menu Commands:

Add File

Add Project

Remove File

Remove All

Print

Print Clipboard

Exit

Format

Header/Footer

Fonts

Print Mode

Select Procedures

Print Code Only

Print Index

Other:

Print Queue

Saving as Text

Direct Text Mode

Copyright/License

Trademarks


Overview

SourcePrinter  version 1.0

Copyright © 1994  F. Douglas Ansuini

All Rights Reserved

SourcePrinter is a utility for printing Visual Basic code in a more usable, professional looking format.  SourcePrinter's features include:

•  Prints VB code with headers, footers, margins, and page numbers

•  Prints procedure headings in bold, comments in italics

•  Line continuation (for lines of code that exceed the page width)

•  Prints all or user-selected files from a project (.mak file)

•  Prints all or user-selected procedures from each file

•  Prints an index of all procedures in a file

•  Can print selected text from within Visual Basic by copying to the clipboard

•  User-selectable fonts for headers, footers, and code (registered version only).

For SourcePrinter to work, your VB forms and modules must be saved in text format.  Of course, most VB programmers recommend that you always "save as text".  See Saving as Text for further elaboration.

This is the shareware version of SourcePrinter.

You may use this version for a 30-day evaluation period.  If you wish to continue using it after the 30-day trial period, you must register the program.  This will provide you with a registered copy of the most recent version of the program, a hard-copy of the documentation, and the knowledge that you're helping support the ideal of shareware and affordable software.

Please see Registering for more information.


Registering

This is the shareware version of SourcePrinter.

You may use this version for a 30-day evaluation period.  If you wish to continue using it after the 30-day trial period, you must register the program.  This will provide you with a registered copy of the most recent version of the program, a hard-copy of the documentation, and the knowledge that you're helping support the ideal of shareware and affordable software.

Ordering by Check:

To print a copy of the order form, you can select the help topic Order Form and choose Print Topic from the File Menu.  Alternatively, you can print the text file ORDER.TXT

To order by check send the order form and a check for $20 to:

Doug Ansuini

P.O. Box 101

Albion, RI  02802-0101

Payments must be in US dollars drawn on a US bank, or you can send international postal money orders in US dollars.


Order Form

You can print this order form by selecting Print Topic from the File Menu, or by printing the file ORDER.TXT

SourcePrinter  version 1.0

Registration/Order Form

To order by check send this order form and check to:

Doug Ansuini

P.O. Box 101

Albion, RI  02802-0101

Payments must be in US dollars drawn on a US bank, or you can send international postal money orders in US dollars.

Site licenses: a site license for SourcePrinter entitles an organization to receive a distribution disk and copy of the documentation for each of the specified number of copies.

SourcePrinter Single Copy    _______    copies at $20 each =	_________

SourcePrinter Site License

 2 to   9 computers: ________ computers at $15 each = 	_________

 (Contact us for prices on more than 9 copies)

Rhode Island residents add 7% sales tax                 	+	_________

                Total payment:	_________

Prices guaranteed through December 1994.

3.5" disks are sent unless a 5.25" disk is requested.

Name: ____________________________________  Date:______________

Company: _____________________________________________________

Address: ______________________________________________________

City, State, Zip: ________________________________________________

Country: ______________________________________________________

EMail address: _________________________________________________

Where did you obtain SourcePrinter? _______________________________

Comments:  ________________________________________________________________________

__________________________________________________________________________________

__________________________________________________________________________________

__________________________________________________________________________________


Saving as Text

In order for SourcePrinter to work, your forms and modules must be saved in text format (as opposed to binary).  However, this should not be too much of an inconvenience, as most Visual Basic programmers would recommend saving all forms and modules as text.  There are several reasons for this:

•  If there should ever be a minor disk error, even one bad byte in a binary file could make the entire module unrecoverable.  However, a text file could easily be recovered, and the error corrected.

•  Certain operations can actually be easier outside the Visual Basic environment, using a standard text editor.  For example, try changing a control array of size 1 to a "normal" (non-array) control in Visual Basic.  Its a very simple operation using any text editor.

•  Finally, saving as text can make cutting and pasting code between projects easier, again using any standard text editor.

How to Save as Text in Visual Basic

In order to save an existing file (.FRM or .BAS) as text, select Save File As from the File menu in Visual Basic, and check the Save as Text checkbox.  That's all there is to it, you can keep the filename the same.  All future times that file is saved, it will be automatically saved as text.

To make saving as text the default format for all your future Visual Basic files, choose Environment from the Options menu in Visual Basic, and select Text for the Default Save As Format.  Now, all future files you create will be saved in Text format.


Direct Text Mode

Direct Text Mode is provided mainly for use with older dot-matrix printers.  Although Windows print mode will work with any printer that has a Windows print driver, we have found that older dot-matrix printers can be excessively slow when printing in Windows mode.

Direct Text Mode avoids this problem by bypassing Windows entirely.  It essentially sends an ASCII text dump to the port your printer is attached to, providing a quick, draft-quality printout in the printer's native font.

Direct Text Mode will print headers, footers, page numbers, and margins.  However, it will not print procedure headings in bold or comments in italics.  Also, because Direct Text Mode directly accesses the printer port, it cannot be used while jobs are printing from the Windows Print Manager.  No other Windows applications can be printing while SourcePrinter is using Direct Text Mode.

If possible, you should use Windows print mode, as it produces higher quality output, and is better behaved in terms of using the Windows Print Manager.  However, for a fast draft-quality printout on a dot-matrix printer, you may want to consider Direct Text Mode.


Add File

The Add File menu item will add a file (.FRM or .BAS) onto the end of the print queue.

The Insert button will insert a file just before the file that has been highlighted in the print queue.  If no file has been highlighted, the file will be added on to the end of the print queue.


Add Project

The Add Project menu item adds all files in a project onto the print queue.  You will be prompted to select a project file (.MAK file).  All files listed in this .MAK file are then added on to the print queue.  If you do not wish to print all of the files in this project, highlight the file you wish to remove from the print queue and use the Remove menu option or button.


Remove File

The Remove File menu item or button will remove the high-lighted (selected) file from the print queue.  If no files in the queue have been selected, or if there are no files in the queue, this command is not enabled.  This has the same function as the Delete key.

To remove all files from the print queue, use the Remove All menu item or button.

Note:  You can remove files from the queue even while SourcePrinter is in the process of printing.  However, you cannot remove a file while it is being printed.  To do this, click the Cancel button to stop the printing, and then remove that file from the queue.


Remove All Files

The Remove All Files menu item or button will remove all files from the print queue.  If there are no files in the queue, this action has no effect.

To remove a single file from the print queue, use the Remove menu item or button.

Note:  You can remove files from the queue even while SourcePrinter is in the process of printing.  However, you cannot remove a file while it is being printed.  To do this, click the Cancel button to stop the printing, and then remove that file from the queue.


Print

The Print menu item or button will print all files in the print queue, in the order that they are listed.  If there are no files in the queue, this button has no effect.

If the menu option Select Procedures is checked, SourcePrinter will prompt you to select which procedures are to be printed before each file is printed.

If you wish to cancel the print, click the Cancel button.

To print the contents of the clipboard, click the Print Clipboard button.


Print Clipboard

The Print Clipboard menu item or button will print the contents of the clipboard.  If the clipboard is empty, or if it contains a format other than text, this button has no effect.

This feature is provided as a way to print from within Visual Basic.  To do this, start SourcePrinter and minimize it.  When you want to print selected text from Visual Basic, select the text and choose Copy from the Edit menu (in Visual Basic).  This copies the text to the clipboard.  Now double-click the minimized SourcePrinter icon to restore SourcePrinter.  Click Print Clipboard, and the selected text will be printed, using all of SourcePrinter's formatting options.  Minimize SourcePrinter again, and you're ready to continue programming.

If you wish to cancel the print, click the Cancel button.


Exit

Fairly self-explanatory.  If you click Exit while printing is in progress, SourcePrinter will ask you if you wish to cancel the print and exit.  If you click OK, SourcePrinter will stop printing, and the program ends.

If you wish to hide SourcePrinter from view without interrupting the printing process, just minimize the window.  Double-click the SourcePrinter icon to restore.


Format

The Format menu item will open the Print Format window.  In this window, you can set options such as Margins, Text Mode Page Width, and if you want to print procedure headings in bold and comments in italics.

Click OK to make the changes, or Cancel to exit the window without making any changes.


Header/Footer

The Header/Footer menu item will open the Header/Footer window.  In this window, you can set options relating to the Headers and Footers.

Project Title:  Enter the name of the project here

3rd Header Line:  Enter any comment you want printed in the header.  If this line is left blank, no third header line will be printed.

Footer Line 1:  Enter the first line of the footer, such as the author's name, for example.  If this line is left blank, it will not be printed.

Footer Line 2:  Enter the second line of the footer.  If this line is left blank, it will not be printed.

Print Headers:  If this box is checked, each page will have the header printed at the top.

Print Footers:  If this box is checked, each page will have the footer printed at the bottom.

Page Numbers:  If this box is checked, each page will have a page number printed in the lower right corner.

Click OK to make the changes, or Cancel to exit the window without making any changes.


Fonts

The Fonts menu item opens the Fonts window.  This allows you to change the fonts and font-sizes that are used for the Headers, Footers, and Code.

The default fonts are Arial bold for the headers and footers, and Courier for the code.  It is recommended that you choose a fixed-width font (such as Courier) for the code, as a variable-width font can make the code look quite disorganized.

Click OK to make the changes, or Cancel to exit the window without making any changes.

Note:  This feature is only available in the registered version of SourcePrinter.  For more information, see Registering.


Print Mode

The Print Mode menu item will open the Print Mode window.  This allows you to change the print mode that SourcePrinter uses.

Text File:  Allows you to write the output to a text file.  It will write headers, footers, margins, and page numbers.

Direct Text Mode:  This sends an ASCII text dump directly to the printer port, which can be much faster on older dot-matrix printers.  Headers, footers, margins, and page numbers are printed, but special fonts, bold, and italics are not used.  Please see this help topic for more information.

Windows Print Mode:  This is the default mode, and should be used if possible.  It employs all the formatting and font options.  It produces particularly nice output on laser printers.

Text Port:  This button allows you to specify which port the printer is connected to.  This is used only for Direct Text Mode printing.  See Direct Text Mode Port for more information.

Click OK to make the changes, or Cancel to exit the window without making any changes.


Direct Text Mode Port

Text Port:  This button allows you to specify which port the printer is connected to.  This is used only for Direct Text Mode printing.

LPT1:	Parallel port 1

LPT2:	Parallel port 2

LPT3:	Parallel port 3

Click OK to make the changes, or Cancel to exit the window without making any changes.


Select Procedures

If the menu option Select Procedures is checked, SourcePrinter will prompt you before each file prints to select which procedures are to be printed.

When the select Procedures window comes up, it shows a list of all subs and functions (including the declarations section) from the file about to be printed.  This list is the list of procedures that will be printed.  In order to remove procedures from the "to be printed" list, select them and click Remove or press Delete.  You can select multiple procedures by holding the mouse button down and dragging, or by pressing the Control key when you click on a procedure.

Remove:  This removes all selected procedures from the "to be printed" list.  This has the same function as the Delete key.

Include All:  This restores all procedures to the "to be printed" list.

OK:  This starts the printing process, printing only the procedures listed in the "to be printed" list.

Cancel:  This cancels the print and returns to the main screen.


Print Code Only

If the menu option Print Code Only is checked, SourcePrinter will only print the code section of forms (.FRM files).  If it is not checked, SourcePrinter will print the entire form file, which includes all the information about the form and the controls contained on it.

Printing code only will still print the declarations section and all procedures in that module, including procedures "attached" to the controls (Command1_Click, etc...), and will still allow you to select which procedures to print.  Therefore, you will probably want to leave this option checked for most printouts.

Note:  The "Print Code Only" option has no effect on modules (.BAS files), since they contain only code.


Print Index

If the menu option Print Index is checked, SourcePrinter will print an index of all procedures in a given file at the end of each file's printout.  This index contains an alphabetical list of all procedures, along with the page number they start on.

This option works in all print modes, for both forms and modules.


Print Queue

This is a list of all files that are to be printed, in the order that they will be printed.  To add a file to the queue, select Add File from the File menu, or click Insert.  To add all files from a project, select Add Project from the File menu.

To remove a file to the queue, highlight the file and select Remove File from the File menu, or  click Remove.  To remove all files from the print queue, select Remove All Files from the File menu, or click Remove All.

To print the files in the queue, select Print from the File menu, or click Print.  As each file completes printing, it will be removed from the print queue.


Cancel Print

The Cancel button will cancel the printing operation.  Whichever file was currently being printed when Cancel was selected will remain on the top of the queue.  This button has no effect if SourcePrinter is not currently printing.


Margins

You can enter the desired margin sizes in the Print Format window (click Format in the Options menu).

All margins are measured in inches.  The left and right margins must be between 0.25 and 3.00 inches.  The top and bottom margins must be between 0.25 and 4.00 inches.


Text Mode Page Width

You can enter the Direct Text Mode Page Width in the Print Format window (click Format in the Options menu).

This tells SourcePrinter how wide the page is, in characters, for printing in Direct Text Mode.  Note, do not allow for margins here, just enter the total page width in characters.  For example, standard letter-size paper, printing in 10 CPI, is 80 characters across.

This has no effect in Windows Print Mode.


Subs and Comments Style

You can choose how you want procedure headings and comments to appear in the Print Format window (click Format in the Options menu).

Print Sub Headings in Bold:  When this is checked, all Sub and Function headings will be printed in bold.  This makes subroutines easier to find in lengthy printouts.

Print Comments in Italics:  When this is checked, all comments will be printed in italics.

These options only apply in Windows Print Mode.


Copyright/License

SourcePrinter  version 1.0

Copyright © 1994  F. Douglas Ansuini

All Rights Reserved

For ordering information, please see Registering.

License Agreement

You should carefully read the following terms and conditions before using this software.

The Shareware version is the unregistered version of SourcePrinter.

You are hereby licensed to use the Shareware Version of this software for a 30 day evaluation period.  You may make as many copies  of the Shareware version of this software as you wish.  You may give exact copies of the original Shareware version to anyone, and distribute the Shareware version of the software and documentation in its unmodified  form via electronic means, as long as all accompanying files are included intact and unmodified.  In fact, you are encouraged to freely distribute the Shareware version of this software.

You are specifically prohibited from charging, or requesting donations, for any such copies, however made, with the exception of a small, reasonable fee to cover only the expense of duplication and  distribution.

You are permitted to redistribute exact copies of the original Shareware  Version and accompanying documentation, in its unmodified form, in packages with other products.

Unregistered use of SourcePrinter after the 30-day evaluation period is in violation of federal copyright laws.

Evaluation Period

This is not free software.  This license allows you to use this software for evaluation purposes without charge for a period of 30 days.  If you wish to use this software after the 30-day evaluation  period, a registration fee of $20 is required.  Payments must be in US dollars drawn on a US bank, and should be sent to:

Doug Ansuini

P.O. Box 101

Albion, RI  02802-0101

Please see Registering for more information on registering and prices. Quantity discounts are available, please contact us for details.   When payment is received you will be sent a registered copy of the  most recent version of SourcePrinter.

One registered copy of SourcePrinter may either be used by a single person who uses the software personally on one or more computers, or installed on a single workstation used non-simultaneously by multiple people, but not both.

You may access the registered version of SourcePrinter through a network, provided that you have obtained individual licenses for the software covering all workstations that will access the software through the network.

DISCLAIMER OF WARRANTY

THIS SOFTWARE AND THE ACCOMPANYING FILES ARE SOLD "AS IS" AND WITHOUT WARRANTIES AS TO PERFORMANCE OF MERCHANTABILITY OR ANY OTHER WARRANTIES WHETHER EXPRESSED OR IMPLIED.   NO WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE IS OFFERED. THE USER MUST ASSUME THE ENTIRE RISK OF USING THIS PROGRAM. ANY LIABILITY OF THE SELLER WILL BE LIMITED EXCLUSIVELY TO PRODUCT REPLACEMENT OR REFUND OF PURCHASE PRICE.


Trademarks

SourcePrinter  version 1.0

Copyright © 1994  F. Douglas Ansuini

All Rights Reserved

Microsoft, Visual Basic, and Windows are trademarks of Microsoft corporation.

The SourcePrinter program is not affiliated with, endorsed by, or even heard of by Microsoft corporation.  It prints files that were written in Visual Basic, but is not connected with Microsoft or the Visual Basic Programming System in any way.